﻿using DongFangGuoKai.WMSPlatform.Domain.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.WMSPlatform.Service.InventoryOrderDetail.DTO
{
    public class StocktakingOrdersDTO:TStocktakingOrderDetails
    {
        public bool checkedAll { get; set; }
        public List<TStocktakingOrders>  stocktakingOrders { get; set; }
    }


    /// <summary>
    /// 盘点计划物资明细信息  
    /// </summary>
    public class TInventorymaterialdetailsDTO
    {
        /// <summary>
        /// 物资编码
        /// </summary>
        public string MaterialCode { get; set; }
        /// <summary>
        /// 物资名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 货位Code
        /// </summary>
        public string StoreLocationCode { get; set; }

        /// <summary>
        /// 关联的盘点计划id
        /// </summary>
        public int PlanId { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public decimal StockCount { get; set; }

        /// <summary>
        /// 实际盘点数量
        /// </summary>
        public int CheckAmount { get; set; }
    
        /// <summary>
        /// 质量状态1.良好，2.损坏，3.报废
        /// </summary>
        public int QualityStatus { get; set; }
        

    }
    public class InventoryOrderNumberDTO
    {
        public List<TInventorymaterialdetailsDTO> Items { get; set; }
        /// <summary>
        /// 盘点计划单id
        /// </summary>
        public int PlanId { get; set; }
        /// <summary>
        /// 盘点计划单号
        /// </summary>
        public string PlanNumber { get; set; }
        /// <summary>
        ///监盘人id
        /// </summary>
        public int SupervisorId { get; set; }
        /// <summary>
        /// 提交人id
        /// </summary>
        public int UserId { get; set; }
    }
    
    // -------------------------------
    //添加盘点单
    public class InventoryIssuanceModel
    {
        /// <summary>
        /// 盘点计划单id
        /// </summary>
        public int PlanId { get; set; }
        /// <summary>
        /// 盘点计划单号
        /// </summary>
        public string? PlanNumber { get; set; }

        /// <summary>
        /// 领用单明细
        /// </summary>
        public List<InventoryIssuanceDetailModel>? Items { get; set; }
    }

    public class InventoryIssuanceDetailModel
    {
        /// <summary>
        /// 存放库位
        /// </summary>
        public string? StoreLocationCode { get; set; }
        /// <summary>
        /// 存放库位Id
        /// </summary>
        public string? StoreLocationId { get; set; }
        /// <summary>
        /// 存放库位描述
        /// </summary>
        public string? StoreLocationRemark { get; set; }
        /// <summary>
        /// 仓库id
        /// </summary>
        public int StoreId { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        public string? StoreName { get; set; }
        /// <summary>
        /// 批次号
        /// </summary>
        public string? Batch { get; set; }
        /// <summary>
        ///   归属部门名称
        /// </summary>
        public string? DeptName { get; set; }
        /// <summary>
        /// 物资编码
        /// </summary>
        public string? MaterialCode { get; set; }
        /// <summary>
        /// 物资名称
        /// </summary>
        public string? MaterialName { get; set; }
        /// <summary>
        /// 型号规格
        /// </summary>
        public string? MaterialNorms { get; set; }
        /// <summary>
        /// 关联的盘点计划单id
        /// </summary>
        public int planId { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public int StockCount { get; set; }
        /// <summary>
        /// 库存明细id
        /// </summary>
        public int StockId { get; set; }
    }



    public class InventoryReturnModel
    {
        public int Id { get; set; }
        /// <summary>
        /// 盘点结果
        /// </summary>
        public string? CheckResult { get; set; }
        /// <summary>
        /// 盘点Id
        /// </summary>
        public int? PlanId { get; set; }
        /// <summary>
        /// 监盘人id  
        /// </summary>
        public int? SupervisorId { get; set; }
        /// <summary>
        /// 提交人ID
        /// </summary>
        public int? UserId { get; set; }
        /// <summary>
        /// 盘点计划单号
        /// </summary>
        public string? PlanNumber { get; set; }
        /// <summary>
        /// 盘点计划物资明细
        /// </summary>
        public List<InventoryReturnDetailModel> Items { get; set; }
    }
    public class InventoryReturnDetailModel
    {

        /// <summary>
        /// 实际盘点数量
        /// </summary>
        public int? CheckAmount { get; set; }
        /// <summary>
        /// 期末结余数量
        /// </summary>
        public int? PeriodSurplus { get; set; }
        /// <summary>
        /// 盈亏数量
        /// </summary>
        public int? ProfitLostAmount { get; set; }
        /// <summary>
        /// 质量状态1.良好，2.损坏，3.报废
        /// </summary>
        public int? QualityStatus { get; set; }
        /// <summary>
        /// 库存明细id
        /// </summary>
        public int? StockId { get; set; }
    }
}
